package Data;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class MyDataInOutStream {
    public static void main(String[] args) {
        //先创建低级输出流
        try(OutputStream os = new FileOutputStream("D:\\software\\code\\2023_java\\2023_java_code\\code_24_4_26\\src\\Data\\DataText");
            //再继续转化为高级流
            DataOutputStream dos = new DataOutputStream(os);
        ){
            dos.writeByte(1);
            dos.writeInt(333);
            dos.writeDouble(333.01);
            dos.writeUTF("你好鸭小蜜蜂!!!!");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
